home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / glibc108.zip / glibc108 / Makerules < prev    next >
Text File  |  1994-05-10  |  18KB  |  521 lines

  1. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  2. # This file is part of the GNU C Library.
  3.  
  4. # The GNU C Library is free software; you can redistribute it and/or
  5. # modify it under the terms of the GNU Library General Public License as
  6. # published by the Free Software Foundation; either version 2 of the
  7. # License, or (at your option) any later version.
  8.  
  9. # The GNU C Library is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. # Library General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU Library General Public
  15. # License along with the GNU C Library; see the file COPYING.LIB.  If
  16. # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  17. # Cambridge, MA 02139, USA.
  18.  
  19. #
  20. #    Common rules for making the GNU C library.  This file is included
  21. #    by the top-level Makefile and by all subdirectory makefiles
  22. #    (through Rules).
  23. #
  24. ifneq (,)
  25. This makefile requires GNU Make.
  26. endif
  27.  
  28.  
  29. ifdef    subdir
  30. ..    := ../
  31. endif    # subdir
  32.  
  33. # If `sources' was defined by the parent makefile, undefine it so
  34. # we will later get it from wildcard search in this directory.
  35. ifneq    "$(findstring env,$(origin sources))" ""
  36. sources :=
  37. endif
  38.  
  39. headers := $(headers) $(sysdep_headers)
  40.  
  41. oPATH := $(PATH)
  42. PATH := this definition should take precedence over $(oPATH)
  43. ifeq ($(PATH),$(oPATH))
  44. You must not use the -e flag when building the GNU C library.
  45. else
  46. PATH := $(oPATH)
  47. endif
  48.  
  49. ifndef +included-Makeconfig
  50. include $(..)Makeconfig
  51. endif
  52.  
  53. # `configure' writes a definition of `config-sysdirs' in `config.make'.
  54. sysdirs = $(config-sysdirs)
  55.  
  56. +sysdir_pfx = $(common-objpfx)
  57.  
  58. export sysdirs := $(sysdirs)
  59.  
  60. +sysdep_dirs := $(addprefix $(sysdep_dir)/,$(sysdirs))
  61. ifdef objdir
  62. +sysdep_dirs := $(objdir) $(+sysdep_dirs)
  63. endif
  64.  
  65. # Add -I switches to get the right sysdep directories.
  66. # `+includes' in Makeconfig references $(+sysdep-includes).
  67. +sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
  68.  
  69. # Include any system-specific makefiles.
  70.  
  71. # This is here so things in sysdep Makefiles can easily depend on foo.h as
  72. # appropriate and not worry about where foo.h comes from, which may be
  73. # system dependent and not known by that Makefile.
  74. vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) \
  75.                       $(addprefix $(sysdep_dir)/,$(sysdirs)) \
  76.                       $(..)))
  77.  
  78. ifeq ($(wildcard $(+sysdir_pfx)sysd-Makefile),)
  79. # Don't do deps until this exists, because it might change the sources list.
  80. no_deps=t
  81. endif
  82.  
  83. # Some sysdep makefiles use this to distinguish being included here from
  84. # being included individually by a subdir makefile (hurd/Makefile needs this).
  85. in-Makerules := yes
  86.  
  87. include $(+sysdir_pfx)sysd-Makefile
  88. $(+sysdir_pfx)sysd-Makefile: $(+sysdir_pfx)config.make $(..)Makerules
  89.     -@rm -f $@T
  90.     (for dir in $(sysdirs); do                             \
  91.        file=sysdeps/$$dir/Makefile;                          \
  92.        if [ -f $(..)$$file ]; then                          \
  93.          echo include "\$$(..)$$file";                      \
  94.        else true; fi;                              \
  95.      done; \
  96.      echo 'sysd-Makefile-done=t') > $@T
  97.     mv $@T $@
  98.  
  99.  
  100. # Reorder before-compile so that mach things come first, and hurd things
  101. # second, before all else.  The mach and hurd subdirectories have many
  102. # generated header files which the much of rest of the library depends on,
  103. # so it is best to build them first (and mach before hurd, at that).
  104. before-compile := $(filter $(common-objpfx)mach% $(common-objpfx)hurd%,\
  105.                $(before-compile)) \
  106.           $(filter-out $(common-objpfx)mach% $(common-objpfx)hurd%,\
  107.                    $(before-compile))
  108.  
  109. # Remove existing files from `before-compile'.  Things are added there when
  110. # they must exist for dependency generation to work right, but once they
  111. # exist there is no further need for every single file to depend on them,
  112. # and those gratuitous dependencies result in many gratuitous
  113. # recompilations.
  114. before-compile := $(filter-out $(wildcard $(before-compile)),$(before-compile))
  115.  
  116. # Don't let any before-compile file be an intermediate and get removed.
  117. ifdef before-compile
  118. $(before-compile):
  119. endif
  120.  
  121. # Generate an ordered list of implicit rules which find the source files in
  122. # each sysdep directory.  The old method was to use vpath to search all the
  123. # sysdep directories.  However, that had the problem that a .S file in a
  124. # later directory would be chosen over a .c file in an earlier directory,
  125. # which does not preserve the desired sysdeps ordering behavior.
  126.  
  127. # When making the list of .dep files to include, we can't know which ones
  128. # have source in .s files, and thus do not in fact need a .dep file.
  129. # So we must define rules to make .dep files for .s files.
  130. define make-dummy-dep
  131. $(addprefix ln $(objpfx)dummy.dep ,$(filter-out $(wildcard $@),$@))
  132. endef
  133. $(objpfx)dummy.dep:
  134.     echo '# .s files cannot contain includes, so they need no deps.' > $@
  135.  
  136. # It matters that this set of rules, for compiling from sources in
  137. # the current directory (the $srcdir/$subdir) come before the
  138. # generated sysdep rules in included from sysd-rules below.  When
  139. # compiling in the source tree, generated sources go into the current
  140. # directory, and those should be chosen before any sources in sysdeps.
  141. $(objpfx)%.o: %.S $(before-compile); $(compile-command.S)
  142. $(objpfx)%.dep: %.S $(before-compile); $(+make-deps)
  143. $(objpfx)%.o: %.s $(before-compile); $(compile-command.s)
  144. $(objpfx)%.dep: %.s $(objpfx)dummy.dep; $(make-dummy-dep)
  145. $(objpfx)%.o: %.c $(before-compile); $(compile-command.c)
  146. $(objpfx)%.dep: %.c $(before-compile); $(+make-deps)
  147.  
  148. # Omit the objpfx rules when building in the source tree, because
  149. # objpfx is empty and so these rules just override the ones above.
  150. ifdef objpfx
  151. # Define first rules to find the source files in $(objpfx).
  152. # Generated source files will end up there.
  153. $(objpfx)%.o: $(objpfx)%.S $(before-compile); $(compile-command.S)
  154. $(objpfx)%.dep: $(objpfx)%.S $(before-compile); $(+make-deps)
  155. $(objpfx)%.o: $(objpfx)%.s $(before-compile); $(compile-command.s)
  156. $(objpfx)%.dep: $(objpfx)%.s $(objpfx)dummy.dep; $(make-dummy-dep)
  157. $(objpfx)%.o: $(objpfx)%.c $(before-compile); $(compile-command.c)
  158. $(objpfx)%.dep: $(objpfx)%.c $(before-compile); $(+make-deps)
  159. endif
  160.  
  161. # System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard
  162. # patterns matching sysdep directories whose assembly source files should
  163. # be suppressed.
  164. ifdef inhibit-sysdep-asm
  165. define open-check-inhibit-asm
  166. case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) : ;; *)
  167. endef
  168. close-check-inhibit-asm = ;; esac
  169. endif
  170.  
  171. # Don't include sysd-rules until sysd-Makefile is already there and has been
  172. # included.  It might define inhibit-sysdep-asm, which would affect the
  173. # contents of sysd-rules.
  174. ifdef sysd-Makefile-done
  175. include $(+sysdir_pfx)sysd-rules
  176. endif
  177. $(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
  178.               $(wildcard $(foreach dir,$(sysdirs),\
  179.                            $(sysdep_dir)/$(dir)/Makefile))
  180.     -@rm -f $@T
  181.     (for sysdir in $(sysdirs); do                             \
  182.        dir="\$$(sysdep_dir)/$$sysdir";                      \
  183.        $(open-check-inhibit-asm) \
  184.        echo "\$$(objpfx)%.o: $$dir/%.S \$$(before-compile); \
  185.         \$$(compile-command.S)";                      \
  186.        echo "\$$(objpfx)%.dep: $$dir/%.S \$$(before-compile); \
  187.         \$$(+make-deps)";                          \
  188.        echo "\$$(objpfx)%.o: $$dir/%.s \$$(before-compile); \
  189.         \$$(compile-command.s)";                      \
  190.        echo "\$$(objpfx)%.dep: $$dir/%.s \$$(objpfx)dummy.dep; \
  191.         \$$(make-dummy-dep)" $(close-check-inhibit-asm);    \
  192.        echo "\$$(objpfx)%.o: $$dir/%.c \$$(before-compile); \
  193.         \$$(compile-command.c)";                      \
  194.        echo "\$$(objpfx)%.dep: $$dir/%.c \$$(before-compile); \
  195.         \$$(+make-deps)";                          \
  196.      done) > $@T
  197.     mv $@T $@
  198.  
  199. ifndef compile-command.S
  200. compile-command.S = $(compile.S) $(OUTPUT_OPTION)
  201. endif
  202. ifndef compile-command.s
  203. compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION)
  204. endif
  205. ifndef compile-command.c
  206. compile-command.c = $(compile.c) $(OUTPUT_OPTION)
  207. endif
  208.  
  209. ifeq ($(notdir $(firstword $(CC))),gcc)
  210. # GCC can grok options after the file name, and it looks nicer that way.
  211. compile.S = $(CC) $< -c $(CPPFLAGS) $(asm-CPPFLAGS)
  212. compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
  213. else
  214. compile.S = $(COMPILE.S) $(asm-CPPFLAGS) $<
  215. compile.c = $(COMPILE.c) $<
  216. endif
  217.  
  218. ifndef OUTPUT_OPTION
  219. ifdef objpfx
  220. # We need this for the output to go in the right place.  It will default to
  221. # empty if make was configured to work with a cc that can't grok -c and -o
  222. # together.  You can't compile the C library with such a compiler.
  223. OUTPUT_OPTION = -o $@
  224. endif
  225. endif
  226.  
  227. S-CPPFLAGS = $(asm-CPPFLAGS)
  228. define +make-deps
  229. -@rm -f $@
  230. $(+mkdep) $< $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
  231. sed $(sed-remove-objpfx) -e 's,$*\.o,$(@:.dep=.o) $@,' > $(@:.dep=.dtm)
  232. mv $(@:.dep=.dtm) $@
  233. endef
  234. ifneq (,$(objpfx))
  235. sed-remove-objpfx = -e 's@ $(subst @,\@,$(objpfx))@ $$(objpfx)@g'
  236. endif
  237.  
  238. # Figure out the source filenames in this directory.
  239.  
  240. override sources    := $(addsuffix .c,$(routines) $(aux) \
  241.                           $(sysdep_routines))
  242. sysdep_routines := $(sysdep_routines)
  243.  
  244. # This is the list of all object files, gotten by
  245. # replacing every ".c" in `sources' with a ".o".
  246. override objects    := $(addprefix $(objpfx),$(sources:.c=.o))
  247.  
  248. +depfiles := $(strip $(sources:.c=.dep) \
  249.              $(patsubst %.o,%.dep,$(filter %.o,$(extra-objs))) \
  250.              $(addsuffix .dep,$(others) $(tests)))
  251. +depfiles := $(addprefix $(objpfx),\
  252.              $(filter-out $(addsuffix .dep,$(omit-deps)),\
  253.                       $(+depfiles)))
  254.  
  255. $(objpfx)depend-$(subdir): Makefile
  256. ifdef +depfiles
  257.     for file in $(+depfiles:$(objpfx)%=%); do \
  258.       echo "include \$$(objpfx)$$file";    \
  259.     done > $@-tmp
  260.     mv -f $@-tmp $@
  261. else
  262.     cp /dev/null $@
  263. endif
  264.  
  265. ifneq ($(no_deps),t)
  266. # Include the generated dependencies of the sources in this directory.
  267. include $(objpfx)depend-$(subdir)
  268. endif
  269.  
  270. # Maximize efficiency by minimizing the number of rules.
  271. .SUFFIXES:    # Clear the suffix list.
  272. # Add the suffixes we use.
  273. .SUFFIXES: .a .o .S .s .c .h .dep
  274.  
  275. # Generic rule for making directories.
  276. %/:
  277. # mkdir isn't smart enough to strip a trailing /.
  278.     mkdir $(@:%/=%)
  279.  
  280. # Make sure that object files are not removed
  281. # when they are intermediates between sources and library members.
  282. # This can go away with make v4.
  283. .PRECIOUS: %.o
  284.  
  285. # Make sure that the parent library archive is never removed.
  286. .PRECIOUS: $(libc.a)
  287.  
  288. # Use the verbose option of ar and tar when not running silently.
  289. ifeq    "$(findstring s,$(MAKEFLAGS))" ""    # if not -s
  290. verbose := v
  291. else                           # -s
  292. verbose    :=
  293. endif                        # not -s
  294.  
  295. ARFLAGS := r$(verbose)
  296.  
  297. # This makes all the object files in the parent library archive.
  298.  
  299. .PHONY: lib libobjs lib-noranlib
  300. $(libc.a): $(libc.a)(__.SYMDEF)
  301. lib: $(libc.a)
  302.  
  303. +libobjs := $(patsubst %,$(libc.a)(%),$(notdir $(objects)))
  304. libobjs: $(+libobjs)
  305. lib-noranlib: libobjs
  306.  
  307. # Define a pattern rule that will match many targets libc.%(foo.o), for
  308. # each foo in $(objects) (% will just happen always to match `a').  This is
  309. # the only way to define a rule that updates many targets at once with one
  310. # sequence of commands.
  311. ifdef objects
  312. $(patsubst %,$(libc.a:a=)\%(%),$(notdir $(objects))): $(objpfx)stamp-$(subdir);
  313. $(objpfx)stamp-$(subdir): $(objects)
  314. #    $(+libc_lock_open)
  315. ifdef objdir
  316.     cd $(objdir); $(AR) cru$(verbose) libc.a $(patsubst $(objpfx)%,%,$^)
  317. else
  318.     $(AR) cru$(verbose) $(..)libc.a $^
  319. endif
  320. #    $(+libc_lock_close)
  321.     touch $@
  322. endif
  323.  
  324. $(libc.a)(__.SYMDEF): $(+libobjs)
  325.     $(RANLIB) $@
  326.  
  327. define +libc_lock_open
  328. @. $(..)libc-lock-open
  329. endef
  330. define +libc_lock_close
  331. @rm -f $(..)LOCK-libc.a
  332. endef
  333.  
  334. # This makes all the object files.
  335. .PHONY: objects objs
  336. objects objs: $(objects)
  337.  
  338. # Installation.
  339.  
  340. # $(install-lib) are installed from the object directory into $(libdir);
  341. # files in $(install-lib) matching `lib%.a' are ranlib'd after installation
  342. # unless they also appear in $(non-lib.a).  $(install-data) are installed
  343. # as they are into $(datadir).  $(headers) are installed as they are in
  344. # $(includedir).  $(install-others) are absolute path names of files to
  345. # install; rules to install them are defined elsewhere.
  346.  
  347. define do-install
  348. $(make-target-directory)
  349. $(INSTALL_DATA) $< $@
  350. endef
  351.  
  352. # Make the target directory if it doesn't exist.  Because of make's
  353. # directory cache, this will produce the `mkdir' command when the directory
  354. # already exists, if it didn't exist at the start of the `make' run.  The
  355. # `-' prefix ignores errors from mkdir, so there will just be some
  356. # gratuitous but harmless `File exists' messages.
  357. define make-target-directory
  358. $(addprefix -mkdir ,$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
  359. endef
  360.  
  361. # Any directory (parent or subdir) that has any object files to build
  362. # should install libc.a; this way "make install" in a subdir is guaranteed
  363. # to install everything it changes.
  364. ifdef objects
  365. install: $(libdir)/lib$(libprefix)c.a
  366. # We avoid depending on lib-noranlib because that makes the parent make
  367. # subdir_lib in all the subdirs, when the make install run they do will
  368. # update the library anyway.  Running ranlib after installing makes the
  369. # __.SYMDEF time stamp up to date, which avoids messages from some linkers.
  370. # Depending on subdir_install gets all the subdirs to update the library,
  371. # and is optimal for `make install' at top level.
  372. $(libdir)/lib$(libprefix)c.a: libobjs subdir_install
  373.     $(make-target-directory)
  374.     $(INSTALL_DATA) $(libc.a) $@
  375.     $(RANLIB) $@
  376. endif
  377.  
  378. ifdef install
  379. $(addprefix $(bindir)/,$(install)): $(bindir)/%: $(objpfx)%
  380.     $(make-target-directory)
  381.     $(INSTALL_PROGRAM) $< $@
  382. endif
  383. ifdef install-lib
  384. install-lib.a := $(filter-out $(non-lib.a),$(filter lib%.a,$(install-lib)))
  385. install-lib-non.a := $(filter-out lib%.a,$(install-lib)) $(non-lib.a)
  386. ifdef install-lib-non.a
  387. $(addprefix $(libdir)/$(libprefix),$(install-lib-non.a)): \
  388.   $(libdir)/$(libprefix)%: $(objpfx)%
  389.     $(do-install)
  390. endif
  391. ifdef install-lib.a
  392. $(install-lib.a:lib%.a=$(libdir)/lib$(libprefix)%.a): \
  393.   $(libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a
  394.     $(do-install)
  395.     $(RANLIB) $@
  396. endif
  397. endif
  398. ifdef install-data
  399. $(addprefix $(datadir)/,$(install-data)): $(datadir)/%: %;$(do-install)
  400. endif
  401. headers := $(strip $(headers))
  402. ifdef headers
  403. $(addprefix $(includedir)/,$(headers)): \
  404.     $(includedir)/%: %;$(do-install)
  405. endif    # headers
  406.  
  407. .PHONY: install-bin-nosubdir install-lib-nosubdir \
  408.     install-data-nosubdir install-headers-nosubdir
  409. install-bin-nosubdir: $(addprefix $(bindir)/,$(install))
  410. install-lib-nosubdir: $(addprefix $(libdir)/,\
  411.                $(patsubst lib%.a,lib$(libprefix)%.a,$(install-lib.a)) \
  412.                $(addprefix $(libprefix),$(install-lib-non.a)))
  413. install-data-nosubdir: $(addprefix $(datadir)/,$(install-data))
  414. install-headers-nosubdir: $(addprefix $(includedir)/,$(headers))
  415. install-others-nosubdir: $(install-others)
  416.  
  417. # We need all the `-nosubdir' targets so that `install' in the parent
  418. # doesn't depend on several things which each iterate over the subdirs.
  419. # This rule makes `install-FOO' always use `install-FOO-nosubdir' as a
  420. # subroutine.  Then in the parent `install-FOO' also causes subdir makes.
  421. install-%:: install-%-nosubdir ;
  422.  
  423. .PHONY: install install-no-libc.a-nosubdir
  424. install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
  425.                 install-bin-nosubdir install-lib-nosubdir    \
  426.                 install-others-nosubdir 
  427. install: install-no-libc.a-nosubdir
  428.  
  429. # Command to compile $< in $(objdir) using the native libraries.
  430. define native-compile
  431. cwd=`pwd`; cd $(@D); $(HOST_CC) $(native-CFLAGS) \
  432.        $(addprefix $$cwd/,$^) -o $(@F)
  433. endef
  434.  
  435. # Command to compile $< in $(common-objdir) using the native libraries.
  436. define common-objdir-compile
  437. cd $(@D); $(HOST_CC) $(native-CFLAGS) $(<:$(common-objpfx)%=%) -o $(@F)
  438. endef
  439.  
  440. # We always want to use configuration -D switches.
  441. native-CFLAGS = $(config-defines)
  442.  
  443. # Support the GNU standard name for this target.
  444. .PHONY: check
  445. check: tests
  446.  
  447. .PHONY: TAGS
  448. TAGS: distfile $(..)MakeTAGS
  449.     $(MAKE) $(addprefix -f ,$^)
  450.  
  451. .PHONY: echo-headers
  452. echo-headers:
  453.     @echo $(headers)
  454.  
  455.  
  456. # Common cleaning targets.
  457.  
  458. .PHONY: common-mostlyclean common-clean mostlyclean clean
  459. clean: common-clean
  460. mostlyclean: common-mostlyclean
  461.  
  462. # Remove the object files.
  463. common-mostlyclean:
  464.     -rm -f $(addprefix $(objpfx),$(tests) $(others) \
  465.                      $(addsuffix .o,$(tests) $(others)))
  466.     -rm -f $(objects) $(addprefix $(objpfx),$(extra-objs) stamp-$(subdir))
  467.     -rm -f core TAGS
  468.  
  469. # Also remove the dependencies and generated source files.
  470. common-clean: common-mostlyclean
  471.     -rm -f $(objpfx)depend-$(subdir) $(+depfiles)
  472.     -rm -f $(addprefix $(objpfx),$(generated))
  473.  
  474. # Produce a file `stub-$(subdir)' which contains `#define __stub_FUNCTION'
  475. # for each function which is a stub.  We grovel over all the .dep files
  476. # looking for references to source files in sysdeps/stub.  Then we grovel
  477. # over each referenced source file to see what stub function it defines.
  478.  
  479. .PHONY: stubs # The parent Makefile calls this target.
  480. stubs: $(common-objpfx)stub-$(subdir)
  481. $(common-objpfx)stub-$(subdir): $(+depfiles)
  482. # Use /dev/null since `...` might expand to empty.
  483.     sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
  484.         `sed -n 's@^.*\($(sysdep_dir)/stub/[a-z0-9_]*\.c\).*$$@\1@p' \
  485.          $^ /dev/null` \
  486.         /dev/null > $@T
  487.     mv $@T $@
  488.  
  489. # Make the distribution tar file.
  490.  
  491. .PHONY: dist
  492. dist: distinfo $(..)Make-dist 
  493.     $(MAKE) -f $< -f $(word 2,$^) $(Make-dist-args)
  494.  
  495. dist: $(distribute)
  496.  
  497. # We used to simply export all these variables, but that frequently made the
  498. # environment get too large.  Instead, we write all the information into
  499. # a generated makefile fragment `distinfo', and then include it with -f in
  500. # the sub-make that makes the distribution (above).
  501. distinfo: Makefile $(..)Makerules
  502.     $(distinfo-vars)
  503.     mv -f $@.new $@
  504.  
  505. define distinfo-vars
  506. $(foreach var,subdir sources sysdep_routines headers distribute \
  507.           dont_distribute generated others tests,
  508. echo >> $@.new '$(var)    := $($(var))')
  509. endef
  510.  
  511. ifneq (,$(strip $(gpl2lgpl)))
  512. ifneq (,$(wildcard $(..)gpl2lgpl.sed))
  513. # Snarf from the master source and frob the copying notice.
  514. $(gpl2lgpl): %: $(..)gpl2lgpl.sed /home/gd/gnu/lib/%
  515.     sed -f $^ > $@-tmp
  516. # So I don't edit them by mistake.
  517.     chmod a-w $@-tmp
  518.     mv -f $@-tmp $@
  519. endif
  520. endif
  521.